home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: Can you printf a long
- Date: Sun, 14 Apr 96 10:53:40 GMT
- Organization: none
- Distribution: world
- Message-ID: <829479220snz@genesis.demon.co.uk>
- References: <4ju8o1$dc3@news.netam.net> <tsw-0804961302160001@cypher.3do.com>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <tsw-0804961302160001@cypher.3do.com> tsw@3do.com "Tom Watson" writes:
-
- >2) The routine 'printf' is a routine that takes a variable number of
- >arguments, and as such goes thru "the usual argument promotions" for your
- >system. While it may not be significant in all cases (read:
- >implementation defined), usually the argument is promoted to a 'double'
- >and its size (again: Implementation defined) is probably 8.
-
- The "default argument promotions" are defined by the standard. The only
- relevant thing that is implementation defined are the values of INT_MAX,
- USHRT_MAX, CHAR_MAX and UCHAR_MAX which will determine whether unsigned short,
- char and unsigned char promote to int or unsigned int. float must always
- be promoted to double which is why %f is always the correct printf
- conversion specifier for both floats and doubles.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-